home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Harvest C / MPW Int & Lib / Interfaces / FixMath.h < prev    next >
Text File  |  1991-04-17  |  1KB  |  76 lines

  1. /************************************************************
  2.  
  3. Created: Thursday, September 7, 1989 at 8:55 PM
  4.     FixMath.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc.    1985-1990
  9.     All rights reserved
  10.  
  11. CHANGE LOG:
  12.     19 Oct 90  JPO  Made Frac2x, Fix2x, X2Fix, and X2Frac
  13.                       in-line trap calls in non-mc68881 mode.
  14.                       
  15. ************************************************************/
  16.  
  17.  
  18. #ifndef __FIXMATH__
  19. #define __FIXMATH__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24.  
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. pascal Fract Fix2Frac(Fixed x)
  29.     = 0xA841;
  30. pascal long Fix2Long(Fixed x)
  31.     = 0xA840;
  32. pascal Fixed FixATan2(long x,long y)
  33.     = 0xA818;
  34. pascal Fixed Long2Fix(long x)
  35.     = 0xA83F;
  36. pascal Fixed Frac2Fix(Fract x)
  37.     = 0xA842;
  38.     
  39. #ifdef mc68881
  40.  
  41. pascal extended Frac2X(Fract x);
  42. pascal extended Fix2X(Fixed x); 
  43. pascal Fixed X2Fix(extended x); 
  44. pascal Fract X2Frac(extended x);
  45.  
  46. #else
  47.  
  48. pascal extended Frac2X(Fract x)
  49.     = 0xA845;
  50. pascal extended Fix2X(Fixed x)
  51.     = 0xA843; 
  52. pascal Fixed X2Fix(extended x)
  53.     = 0xA844; 
  54. pascal Fract X2Frac(extended x)
  55.     = 0xA846;
  56.  
  57. #endif
  58.  
  59. pascal Fract FracMul(Fract x,Fract y)
  60.     = 0xA84A;
  61. pascal Fixed FixDiv(Fixed x,Fixed y)
  62.     = 0xA84D;
  63. pascal Fract FracDiv(Fract x,Fract y)
  64.     = 0xA84B;
  65. pascal Fract FracSqrt(Fract x)
  66.     = 0xA849;
  67. pascal Fract FracSin(Fixed x)
  68.     = 0xA848;
  69. pascal Fract FracCos(Fixed x)
  70.     = 0xA847;
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74.  
  75. #endif
  76.